package com.ruoyi.common.enums;

/**
 * Company: 中泰信息（常州）有限公司
 * Department: 开发部
 * Desc: 污染因子枚举
 */
public enum PollutionFactorEnum {
	COND("COND", "cond"),
	PH("PH", "ph"),
	DO("DO", "ry"),
	FTU("FTU", "zd"),
	TEMP("TEMP", "wd"),
	NH3N("NH3-N-S", "ad"),
	TP("TEMP", "zl"),
	TN("TEMP", "tn"),
	COD("COD", "cod");

	private String factorName;
	private String entityField;

	PollutionFactorEnum(String factorName, String entityField) {
		this.factorName = factorName;
		this.entityField = entityField;
	}

	public String getFactorName() {
		return factorName;
	}

	public String getEntityField() {
		return entityField;
	}

	public static PollutionFactorEnum getByName(String factorName) {
		if (factorName == null || factorName.equals("") || factorName.trim().equals("")) {
			return null;
		}
		for (PollutionFactorEnum value : PollutionFactorEnum.values()) {
			if (value.getFactorName().equals(factorName)) {
				return value;
			}
		}
		return null;
	}

}
